#Import the text-based adventure game engine
import text_engine

#Create a new game
sweatyGame = text_engine.Game()

#Define game's welcome text
sweatyGame.welcome = "Welcome to this sweaty game."

#Define the text that appears when the player enters text that is not one of the choices
sweatyGame.error_text = "NO. YOU CAN'T DO THAT. FATTY."

#Define if help will be given when player enters text that is not one of the choices
sweatyGame.give_help = True

#Define the help key (default: '?')
sweatyGame.help_key = "?"

#Define the text to be displayed when the player wins (Default: "Congratulations! You win!"
sweatyGame.congrats_text = "Congratulations! You win!"



#Create a new room
roomOfSweat = text_engine.Room()

#Add a description of the room, preferrable including hints as to what to do
roomOfSweat.description = """
You wake up in a room. Slowly, as you regain your vision, you begin to feel a bit lightheaded.
You're incredibly thirsty. So thirsty that your mouth and throat are on fire.
Looking around the room, you notice the floors and walls seem to have a certain glossy look to them.
They're covered in sweat. Thick sweat, nothing like human sweat. You're so thirsty.
In the room there are two doors, a right an a left, a bucket, a window, and a floor and walls covered in sweat.
What will you do?
"""

#Create the rooms linked to by the previous room
tropicalOasisRoom = text_engine.Room()
saunaRoom = text_engine.Room()
bucketRoom = text_engine.Room()
windowRoom = text_engine.Room()
trippyRoom = text_engine.Room()

#Remember to add descriptions to each room
tropicalOasisRoom.description = """
You open the door, and behind it is a tropical oasis. Cool beans, your thirst is quenched.
"""

saunaRoom.description = """
Um. You open the door.... and there's a sauna. Lucky you.
"""

bucketRoom.description = """
You move to look at the bucket, but you trip and fall. You inhale the terrible substance inside.
You catch a disease and die.
"""

windowRoom.description = """
Well isn't that a cool window. You're still in the same room.
"""

trippyRoom.description = """
You REALLY shouldn't have done that. Like, really. The world starts to fold in on itself.
You ask yourself why you're here, and the question drives you insane. 
Everything just melts. Your hands, your face, the bucket in the corner, the doors...
You find yourself singing the theme from Spongebob Squarepants over and over.
And over. And over. And over. For the rest of eternity. At least you didn't die from thirst.
"""

#If the room is a 'losing' room, add that variable (default: False)
saunaRoom.lose = True
bucketRoom.lose = True
trippyRoom.lose = True


#Link certain choices the player can make in this room to the room that the player will go to next
roomOfSweat.choices = {"open left door":tropicalOasisRoom, "open right door":saunaRoom, "look at bucket":bucketRoom,
						"look out window":windowRoom, "drink sweat":trippyRoom}

#At this point, you would create any rooms that branch out from the other rooms previously created
#Then you would define which old rooms link to which new rooms
#Alternatively, you could create EVERY room at the beginning, THEN define the links between the rooms
#You can not, however, define a link to a room before creating that room.
				
						
						
						
#Tell the game what room to run first
sweatyGame.first_room = roomOfSweat

#Tell the game which rooms don't have any rooms following them
sweatyGame.last_rooms = [tropicalOasisRoom, saunaRoom, bucketRoom, windowRoom, trippyRoom]

#Define what text asks if the use would like to play again (default: "Play again? (type q to quit)")
sweatyGame.play_again_text = "Play again? (type q to quit)"

#Start the game
sweatyGame.play()